import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class LifeServlet extends HttpServlet {
    int b=10;

    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {

        int a=9;
        System.out.println("b="+(b++));
        System.out.println("a="+(a++));
    }
    @Override
    public void destroy() {
        System.out.println("hhh");
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void init() throws ServletException {
        System.out.println("你好么");
    }

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("我很好");
    }


}
